﻿
    using Maticsoft.BLL;
    using Maticsoft.Model;

    using System;
    using System.Web.UI.HtmlControls;

    public partial class WebPage_SheZhi_sohu : SystemBBasePage
    {
        public string check = "";
        public Maticsoft.BLL.System sysbll = new Maticsoft.BLL.System();
        public Maticsoft.Model.System sysmodel = new Maticsoft.Model.System();

        public void IsUse()
        {
            int num = 0;
            this.sysmodel = this.sysbll.GetModel(1);
            if ((base.Request["chsohu"] != null) && (base.Request["chsohu"] != ""))
            {
                num = 1;
            }
            this.sysmodel.Enablesohulogin = num;
            this.sysmodel.Sohuloginkey = base.Request["key"];
            this.sysbll.Update(this.sysmodel);
            base.SetSuccess("设置成功");
        }

        protected override void OnLoad(EventArgs e)
        {
            base.OnLoad(e);
            this.HeaderControl1.Select = "shezhi";
            if (base.Request["btnsave"] == "保存")
            {
                this.IsUse();
            }
            this.sysmodel = this.sysbll.GetModel(1);
            if (this.sysmodel.Enablesohulogin == 0)
            {
                this.check = "";
            }
            else
            {
                this.check = "checked=checked";
            }
        }
    }


